package com.junlong0716.enjoylearning.entity

import com.chad.library.adapter.base.entity.MultiItemEntity

/**
 *@author: 巴黎没有摩天轮Li
 *@description:
 *@date: Created in 下午9:36 2018/6/2
 *@modified by:
 */

/*
{
				"id": 2, //知识id
				"knowledgeType": 2, //知识类型(1.视频，2.音频，3.文摘)
				"knowledgeTitle": "学习十九大精神", //知识标题
				"knowledgeContent": null,
				"knowledgeAuthor": "1",
				"coverImg": "test2.jpg", //封面图片
				"fileAddress": null,
				"browseNumber": null,
				"praiseNumber": null, //点赞量
				"commentNumber": null,
				"specialId": null,
				"createBy": null,
				"createDate": 1525515315000, //创建时间
				"updateBy": null,
				"updateDate": null,
				"remarks": null,
				"delFlag": null,
				"authorName": "luke" //作者姓名
			}
*/

class SearchResultEntity(var id: Int, var knowledgeType: Int, var knowledgeTitle: String,
                         var knowledgeContent: String, var knowledgeAuthor: String,
                         var coverImg: String, var fileAddress: String,
                         var browseNumber: String, var praiseNumber: Int,
                         var commentNumber: String, var specialId: String,
                         var createDate: Long, var authorName: String): MultiItemEntity{


    companion object {
        //推荐视频
        const val ITEM_TYPE_VIDEO = 1
        //推荐音频
        const val ITEM_TYPE_AUDIO = 2
        //推荐文稿
        const val ITEM_TYPE_DOCUMENT = 3
    }

    override fun getItemType(): Int {
        return knowledgeType
    }

}